import time
from  selenium import webdriver
from selenium.webdriver.common.by import By

driver=webdriver.Chrome()
driver.maximize_window()
driver.implicitly_wait(30)
driver.get("http://192.168.4.138/ecshop/user.php")
driver.implicitly_wait(30)
#登录
driver.find_element(By.NAME,"username").send_keys("李丽丽")
driver.find_element(By.NAME,"password").send_keys("123457")
driver.find_element(By.NAME,"submit").click() #点击【登录】按钮
driver.find_element(By.XPATH,"/html/body/div[1]/div/div/a[1]").click() #点击【我的账户】
driver.find_element(By.XPATH,"/html/body/div[7]/div[1]/div/div/div/div/a[2]").click() #点击【用户信息】
driver.find_element(By.NAME,"old_password").send_keys("123457")
driver.find_element(By.NAME,"new_password").send_keys("123456")
driver.find_element(By.NAME,"comfirm_password").send_keys(123456)
driver.find_element(By.NAME,"submit").click()
time.sleep(3)
